import request from '@/utils/request'
export default {

    //添加小节
    addVideo(video) {
        return request({
            url: 'http://localhost:8001/eduservice/video/saveVideo',
            method: 'post',
            data: video
          })
    },
    //编辑小节
    updateVideo(video) {
        return request({
            url: 'http://localhost:8001/eduservice/video/updateVideo',
            method: 'post',
            data: video
          })
    },
    //根据id查询小节
    getVideo(id) {
        return request({
            url: `http://localhost:8001/eduservice/video/getVideoInfo/${id}`,
            method: 'get',
          })
    },
    //删除小节同时删除视频
    deleteVideo(id) {
        return request({
            url: `http://localhost:8001/eduservice/video/del/${id}`,
            method: 'delete'
          })
    },
    //删除视频
    removeAliyVideo(id) {
    return request({
        url: `http://localhost:8003/eduvod/vod/removeAlyVideo/${id}`,
        method: 'delete'
    })
}
}